﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Aribaccio
{
    /// <summary>
    /// 定义返回数据结果集[模型对象]
    /// </summary>
    /// <typeparam name="T">对象模型</typeparam>
    public class ResultList<T> : Result
    {
        /// <summary>
        /// 存储模型数据对象集合
        /// </summary>
        public List<T> Data { get; set; }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        public ResultList() : base() { this.Data = new List<T>(); }
        /// <summary>
        /// 带参构造函数 
        /// </summary>
        /// <param name="argResultData">数据模型对象集合</param>
        public ResultList(List<T> argResultData) : base() { this.Data = argResultData; }

        /// <summary>
        /// 带参构造函数
        /// </summary>
        /// <param name="argResultMsg">信息描述</param>
        public ResultList(string argResultMsg) : base(argResultMsg) { this.Data = new List<T>(); }
        /// <summary>
        /// 带参构造函数
        /// </summary>
        /// <param name="argResultMsg">信息描述</param>
        /// <param name="argResultData">数据模型对象集合</param>
        public ResultList(string argResultMsg, List<T> argResultData) : base(argResultMsg) { this.Data = argResultData; }


        /// <summary>
        /// 带参构造函数
        /// </summary>
        public ResultList(ResultStatus argResultCode) : base(argResultCode) { this.Data = new List<T>(); }
        /// <summary>
        /// 带参构造函数
        /// </summary>
        /// <param name="argResultCode">状态代码</param>
        /// <param name="argResultData">数据模型对象集合</param>
        public ResultList(ResultStatus argResultCode, List<T> argResultData) : base(argResultCode) { this.Data = argResultData; }
        /// <summary>
        /// 带参构造函数
        /// </summary>
        /// <param name="argResultCode">状态代码</param>
        /// <param name="argResultMsg">信息描述</param>
        public ResultList(ResultStatus argResultCode, string argResultMsg) : base(argResultCode, argResultMsg) { this.Data = new List<T>(); }
         /// <summary>
        /// 带参构造函数
        /// </summary>
        /// <param name="argResultCode">状态代码</param>
        /// <param name="argResultMsg">信息描述</param>
        /// <param name="argResultData">数据模型对象集合</param>
        public ResultList(ResultStatus argResultCode, string argResultMsg, List<T> argResultData) : base(argResultCode, argResultMsg) { this.Data = argResultData; }
    }
}
